package cn.java59;

import java.util.Scanner;

public class Homework6 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.println("输入第一个数：");
		int num1 = sc.nextInt();
		System.out.println("输入运算符：");
		char op = sc.next().charAt(0);
		System.out.println("输入第二个数：");
		int num2 = sc.nextInt();
		switch (op) {
		case '+':
			System.out.println(num1 + num2);
			break;
		case '-':
			System.out.println(num1 - num2);
			break;
		case '*':
			System.out.println(num1 * num2);
			break;
		case '/':
			System.out.println(num1 / num2);
			break;
		case '%':
			System.out.println(num1 % num2);
			break;
		default:
			System.out.println("输入有误");
			break;

		}

	}

}
